// 环境配置类型定义
export interface EnvConfig {
  env: string;
  apiBaseUrl: string;
  mockEnable: boolean;
  timeout: number;
}

// 从环境变量获取配置
export const getEnvConfig = (): EnvConfig => {
  return {
    env: process.env.REACT_APP_ENV || 'development',
    apiBaseUrl: process.env.REACT_APP_API_BASE_URL || 'http://localhost:8080/api',
    mockEnable: process.env.REACT_APP_MOCK_ENABLE === 'true',
    timeout: parseInt(process.env.REACT_APP_TIMEOUT || '5000', 10)
  };
};

// 导出当前环境配置
export const envConfig = getEnvConfig();
    